import { getProxyPath } from '../config/proxyPath'
import { createRequest } from '../utils/request'
import { addparam } from './addParam'
const baseURL = getProxyPath('loginAuth')
const request = createRequest({ baseURL })

/**用户登录 */
export function userLogin(data) {
  data = addparam(data)
  return request.postFormUrl('/sysViewLoginApi/login', data)
}

/**用户免登录 */
export function adminViewTokenLogin(data) {
  data = addparam(data)
  return request.postFormUrl('/sysMenuApi/viewTokenLogin', data)
}
/**用户登出 */
export function userLogout(data) {
  data = addparam(data)
  return request.postFormUrl('/sysLoginApi/loginout', data)
}
